src = $(wildcard ./src/*.c)    # add.c sub.c div.c hello.c
obj = $(patsubst ./src/%.c, ./obj/%.o, $(src)) # add.o sub.o div.o hello.o

ALL:a.out 

myArgs = -Wall -g

inc_path=./inc 

a.out:$(obj)
	gcc $^ -o $@ $(myArgs)

$(obj):./obj/%.o:./src/%.c
	gcc -c $< -o $@ $(myArgs) -I $(inc_path)

clean:
	-rm -rf $(obj) a.out

.PHONY:clean ALL
